import WMap from '../map/index.js'

const map = new WMap.Map('map', {
	center: [104.42239474922181, 34.63836406549072]
})

map.on('click', e => {
	map.panTo(e.lngLat)
	console.log(e.lngLat)
})

const changeMapSatelliteDom = document.getElementById('changeMapSatellite')
const changeMapStandardDom = document.getElementById('changeMapStandard')

//标准地图
changeMapSatelliteDom.onclick = () => {
	map.setBaseLayer('satellite')
}

//卫星地图
changeMapStandardDom.onclick = () => {
	map.setBaseLayer('standard')
}
